Change detection task - Data

Task description:

Task set-up: An image of planet Earth with an blue dotted orbit was presented at the center of the screen. On every trial, a spaceship would appear somewhere along the orbit, with the trial-by-trial position being sampled from a Normal distribution with some mean and standard deviation.

Instruction: Participants were instructed to predict the position of the spaceship on the next trial by clicking somewhere along the orbit.

Trial description:

  1. Trial starts. A spaceship appears somewhere along the drawn orbit for half a second, and then disappears

  2. Participants’ input. Participants are given unlimited time to indicate the place along the circumference where they expect the spaceship to appear on the next trial.

  3. Input confirmation. A red dot indicating the predicted location was presented inside a red circle capturing the margin error. At the same time, the spaceship showed up in its new position.

  4. Feedback. If the spaceship fell inside the red circle, it turned red indicating the new location was accurately predicted.

  5. NEW Trial starts. The spaceship location observed serves as the starting point of the next trial.

No. of trials: 300 trials per condition. 1200 trials in total.

Conditions: The task included the following four experimental conditions:

  1. Stationary condition. The spaceship location on all 300 trials was determined by taking a sample of a single Normal distribution, with a mean and variance that remained fixed during the entire time.

  2. Abrupt condition

  3. Gradual condition

  4. Mixed condition A mixture of the Abrupt and Gradual condition.

Data description

The data from this experiment is stored in the following .RData file:

load("./archive/abrupt_gradual.Rdata")

This loads an object called ag which holds the data in four dimensions:

  • First dimension (rows) indicate trial count
  • Second dimension (columns) indicate the variables observed
  • Third dimension (pages) indicates the condition
  • Fourth dimension (repetition) indicates the participant.
dim(ag)
## [1] 300   6   4  24

There were 24 participants in this experiment, which completed 300 trials of each of the 4 conditions included, with a total of variables being recorded per trial. We’ll describe these variables upon looking at the first 5 observations collected for participant 15 in condition 1:

##          resp     true     mean velocity change        rt
## [1,]       NA 5.762655 5.796635        0      0 2.4893215
## [2,] 5.581353 5.936055 5.796635        0      0 0.5926501
## [3,] 6.132120 6.024975 5.796635        0      0 0.5298493
## [4,] 6.259605 5.532261 5.796635        0      0 2.5353324
## [5,] 5.524184 5.781220 5.796635        0      0 2.1265852

For each trial, we keep track of the following information:

  1. Predicted location (resp) - The response the participant gave when trying to predict the location of the spaceship on the next trial, measured in radians.
  2. The true location (true) - The location (in radians) of the spaceship that the participant observes.
  3. Mean location (mean) - The mean (in radians) of the Normal distribution from where the locations observed on every trial are observed.
  4. Velocity (velocity) - The rate of change
  5. Change-points (change) - A binary variable indicating whether a change has occured or not
  6. RTs (rt) - Response time in seconds

Transformations

All variables related to the spaceship position along the orbit (resp, true and mean) are measured in radians, however, they are not restricted to the \((0, 2\pi)\) interval. For example, if the spaceship had completed more than a full lap counter-clocwkise, its position could take values larger than \(2\pi\).

Velazquez, Villarreal and Bouzas (2019) modeled data obtained using the same task using three different RL models that focused on the prediction error observed on every trial. However, in order to model these data using the Circular Drift Diffusion we will need to transform the data to make it fit into the \((0, 2\pi)\) interval. To do so, we will simply keep the remainder obtained from dividing the values recorded by \(2\pi\):

ag[,"resp",,] <- ag[,"resp",,] %% (2*pi)
ag[,"true",,] <- ag[,"true",,] %% (2*pi)
ag[,"mean",,] <- ag[,"mean",,] %% (2*pi)

Required cleaning steps

Data per condition

There are four different experimental conditions in this experiment. To discuss each one of them

data_stationary <- ag[,,1,]  # Condition 1:  No changes
data_abrupt <- ag[,,2,]      # Condition 2: 
data_gradual <- ag[,,3,]     # Condition 3:
data_mixed <- ag[,,4,]       # Condition 4: 

Stationary condition

In this first condition, the position of the spaceship on every trial was sampled from a Normal distribution with a fixed mean and standard deviation.

There are not any change-points (i.e., the change variable is always 0 in every trial), and the rate of change (the velocity variable) is always 0.

For each participant, the mean of the Normal distribution from which the trial-by-trial positions are sampled is randomly selected, but it remains fixed throughout all 300 trials.

unique(data_stationary[,"mean",])
##         [,1]     [,2]      [,3]     [,4]    [,5]     [,6]     [,7]     [,8]
## [1,] 5.11906 3.772472 0.7007833 3.277056 5.11906 1.730773 0.959463 6.196545
##           [,9]   [,10]   [,11]    [,12]    [,13]      [,14]    [,15]    [,16]
## [1,] 0.8661654 3.73331 6.16038 1.899014 3.456012 0.04396958 5.796635 5.982167
##         [,17]    [,18]    [,19]    [,20]   [,21]    [,22]    [,23]    [,24]
## [1,] 2.832946 4.038465 3.406046 3.560182 4.11135 5.886488 5.943956 3.042925
data_perCondition(data = ag, condition = 1)

Abrupt condition

In this first condition, the position of the spaceship on every trial was sampled from a Normal distribution with a fixed mean and standard deviation.

There are not any change-points (i.e., the change variable is always 0 in every trial), and the rate of change (the velocity variable) is always 0.

abrupt_change <- data_abrupt[,"change",]
apply(abrupt_change, 2, table)
##   [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14]
## 0  293  294  298  293  294  293  294  296  294   293   295   294   294   293
## 1    7    6    2    7    6    7    6    4    6     7     5     6     6     7
##   [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24]
## 0   295   296   293   293   293   296   293   293   291   293
## 1     5     4     7     7     7     4     7     7     9     7
data_perCondition(data = ag,condition = 2)

Gradual condition

gradual_change <- data_gradual[,"change",]
unique(gradual_change)
##      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14]
## [1,]    0    0    0    0    0    0    0    0    0     0     0     0     0     0
##      [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24]
## [1,]     0     0     0     0     0     0     0     0     0     0
data_perCondition(data = ag,condition = 3)

Mixed condition

apply(data_mixed[,"change",],2,table)
##   [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14]
## 0  295  292  291  292  298  294  292  293  294   291   291   293   293   292
## 1    5    8    9    8    2    6    8    7    6     9     9     7     7     8
##   [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24]
## 0   293   294   295   296   293   293   293   293   294   294
## 1     7     6     5     4     7     7     7     7     6     6
data_perCondition(data = ag,condition = 4)